import { createRouter, createWebHashHistory } from "vue-router/dist/vue-router";
const routes = [
  {
    path: "/UserPage",
    name: "UserPage",
    component: () => import("../views/UserPage.vue"),
  },
  {
    path: "/OrderPage",
    name: "OrderPage",
    component: () => import("../views/OrderList.vue"),
  },
  {
    path: "/Report",
    name: "Report",
    component: () => import("../views/ToReport.vue"),
  },
  {
    path: "/Details",
    name: "Details",
    component: () => import("../views/DetailsPage.vue"),
  },
  {
    path: "/Us",
    name: "Us",
    component: () => import("../views/OurPage.vue"),
  },
  {
    path: "/UserInfo",
    name: "UserInfo",
    component: () => import("../views/UserInfo.vue"),
  },
  {
    path: "/RegisterPage",
    name: "RegisterPage",
    component: () => import("../views/RegisterPage.vue"),
  },
  {
    path: "/",
    name: "home",
    component: () => import("../views/HomePage.vue"),
  },
  {
    path: "/chatPage/:subpath",
    name: "chatPage",
    component: () => import("../views/ChatPage.vue"),
    props: true,
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
